from celery.schedules import crontab
from weather.config import weather_config

broker_url = weather_config.get('redis')['sync_url']

timezone = 'Asia/Shanghai'

imports = [
    'push.push_task',
]

# schedules
beat_schedule = {
    'junk_clean_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=8, minute=0),
        'args': ('JunkClean',)
    },
    'phone_boost_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=9, minute=0),
        'args': ('PhoneBoost',)
    },
    'wx_clean_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=10, minute=0),
        'args': ('WxClean',)
    },
    'phone_cooler_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=11, minute=0),
        'args': ('PhoneCooler',)
    },
    'security_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=12, minute=0),
        'args': ('Security',)
    },
    'battery_saver_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=13, minute=0),
        'args': ('BatterySaver',)
    },
    'space_clean_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=14, minute=0),
        'args': ('SpaceClean',)
    },
    'app_lock_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=15, minute=0),
        'args': ('AppLock',)
    },
    'clipboard_push1': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=16, minute=0),
        'args': ('Clipboard',)
    },
    'junk_clean_push2': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=17, minute=0),
        'args': ('JunkClean',)
    },
    'phone_boost_push2': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=18, minute=0),
        'args': ('PhoneBoost',)
    },
    'wx_clean_push2': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=19, minute=0),
        'args': ('WxClean',)
    },
    'phone_cooler_push2': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=20, minute=0),
        'args': ('PhoneCooler',)
    },
    'security_push2': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=21, minute=0),
        'args': ('Security',)
    },
    'battery_saver_push2': {
        'task': 'push.push_task.cron_push',
        'schedule': crontab(hour=22, minute=0),
        'args': ('BatterySaver',)
    }
 }

